package com.joint.cloud.common.exception.msg;

public class ResourceAlreadyExistExceptionErrorMsg extends BaseAIOpsExceptionErrorMsg {

    private String resourceType;

    private Object resourceName;

    public ResourceAlreadyExistExceptionErrorMsg(String resourceType, Object resourceName) {
        this.resourceType = resourceType;
        this.resourceName = resourceName;
    }

    @Override
    public String generateErrorMsg() {
        return "Resource '" + resourceType + "' ( with Name " + resourceName.toString() + " ) Already Exists!";
    }

    @Override
    public String generateErrorMsgLocal() {
        return "资源'" + resourceType + "'（名称为" + resourceName.toString() + "）已存在！";
    }
}
